Repository navigation
asio: make_tls_client_context is [[nodiscard]], and asio asks for the nodiscard results rule - #6
Merged
Merged
Conversation
added 2 commits
November 16, 2026 02:38
Three compile-diagnostic tests wrapped their expected text over two // lines. clang's -verify cannot find the closing }} there, reports an error the rule ignores, and drops the directive, so the tests checked nothing. Each now states a shorter part of the message on one line.
…xt is [[nodiscard]]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
boost::system::resultcarries no[[nodiscard]]of its own, so a caller that drops amake_tls_client_contextresult, a context or its refusal, would go on as if the context trustedits authorities. Both overloads are now
[[nodiscard]], and meta/lint.json asks for thesuperproject's
nodiscard resultslint rule, which keeps every function ofinclude/thatreturns
boost::system::resultso.This branch stacks on fix/diagnostic-directives (its own pull request): until that one merges,
this one shows its commit too. The superproject records this commit as
libs/asioinwebcpporg/webcpp's nodiscard/v0.1 pull request, which merges after the crypto and hash ones.
Changes
[[nodiscard]]on both overloads (Doc Commentsunchanged).
"nodiscard-results"and its reason.Verification
Emscripten and gcc-15 lanes compile asio's tests and examples with warnings as errors and report
no discarded result, from scratch, in the superproject's nodiscard/v0.1 tree with this commit
recorded: native 78, wasip2 34, wasip3 84, Emscripten 113, gcc-15 70 tests passed, 0 failed.
nodiscard resultsincluded:lint: clean(2267 compilecommands).
🤖 Generated with Claude Code